package com.kaba.xtzhgl.controller;

import com.kaba.bean.ResponseResult;
import com.kaba.bean.ResultCode;
import com.kaba.bean.SysPost;
import com.kaba.xtzhgl.service.SysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author lvmengjie
 * @Date 2021/3/11
 * @Description TODO
 */
@RequestMapping("/syspost")
@RestController
@CrossOrigin
public class SysPostContorller {

    @Autowired
    private  SysPostService sysPostService;

    @GetMapping("/queryPost")
    public ResponseResult queryPost(){
        List<SysPost> listpost =sysPostService.list();
        return  ResponseResult.success(ResultCode.SUCCESS,listpost);
    }

}
